# _*_ coding: utf-8 _*_
# @Time     : 2022/7/24 13:06
# @Author   : dake
# @Email    : dake@2545923.com
# @File     : run.py
# @Software : PyCharm
import unittest
import time
import os
from config.config import CASES_PATH, REPORTS_PATH
from HTMLTestRunner_cn import HTMLTestRunner
now = time.strftime("%Y%m%d%H%M%S")
suite = os.path.join(REPORTS_PATH, "test_crm_{}.html".format(now))
"""与测试套件组合"""
discover = unittest.defaultTestLoader.discover(CASES_PATH, "test_*.py")
with open(suite, "wb") as f:
    runner = HTMLTestRunner(stream=f,
                            title="crm测试报告",
                            description="测试执行情况")
    runner.run(discover)

